package com.star.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * com.star.pojo
 *
 * @Description: 评论实体类
 * @Date: 2020-08-05 16:37
 * @Author: LENSTAR
 * @URL: http://123.57.161.114:9000/
 */

//评论类
@Data
@NoArgsConstructor
public class Comment {
    private Long id;
    private String nickname;
    private String email;
    private String avatar;//头像
    private String content;
    private Date createTime;
    private boolean adminComment;//是否为管理员评论

    //父评论昵称（parentNickname）用来设置父级评论的id、父评论（parentComment）用来显示父级评论昵称
    private Blog blog;
    private Long blogId;
    private Long parentCommentId;//父评论id
    private String parentNickname;
    private List<Comment> replyComments = new ArrayList<>();//回复评论集合
    private Comment parentComment;//父评论
}